/*
 * Copyright © 2024-2025 Wenze Wei
 *
 * This file is part of StadionOS.
 *
 * This Source Code Form is subject to the terms of the GNU General Public License, v. 2.0.
 * You can obtain a copy of the GPL at
 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 */

#include "../include/errorr.h"

/**
 * @brief Retrieves the current error state.
 *
 * This function returns the current value of the global error variable.
 * It is used to check the status of the last operation that might have caused an error.
 *
 * @return int The current error state.
 */
int Sgetr(void) {
    return error;
}

/**
 * @brief Sets the error state.
 *
 * This function sets the global error variable to the specified error code.
 * It is used to indicate that an error has occurred and to specify the error code.
 *
 * @param err The error code to set.
 */
void Ssetr(int err) {
    error = err;
}
